import React, {Component} from 'react';
import {
    StyleSheet,
    Text,
    View,
    Image,
    TouchableOpacity
} from 'react-native';
/**
 * 由 WangYu 创建
 * 日期 2017/9/13
 */
export default class HomeMunuItemView extends Component {

    constructor(props) {
        super(props);
    }

    render() {
        return (
            <TouchableOpacity style={{flex:1}} onPress={this.props.onPress}>
            <View style={styles.container}>
                <View style={{justifyContent:'center',alignItems:'center'}}>
                    <Text style={{fontWeight:'bold',fontSize:20,color:this.props.titleColor}}>{this.props.title}</Text>
                    <Text style={{fontWeight:'bold',fontSize:15,color:"#999999"}}>{this.props.subTitle}</Text>
                </View>
                <Image source={{uri:this.props.imageUri}} style={{width:60,height:50}}/>
            </View>
            </TouchableOpacity>
        );
    }
}

const styles = StyleSheet.create({
    container: {
       flex:1,
        flexDirection:'row',
        justifyContent:'space-between',
        alignItems:'center',
        paddingRight:10,
        paddingLeft:10,
    },
});
